<?php
include '../conn.php';
include 'a-cookie.php';

?>

<!DOCTYPE html>
<html lang="zh">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>答辩组内管理</title>
    <link rel="stylesheet" type="text/css" href="../css/htmleaf-demo.css">
    <link rel="stylesheet" type="text/css" href="../css/nav.css">
    <link rel="stylesheet" type="text/css" href="../fonts/iconfont.css">

    <link rel="stylesheet" href="../css/bootstrap-theme.css"/>

    <script type="text/javascript" src="../js/jquery.min.js"></script>
    <link rel="stylesheet" href="../css/bootstrap-theme.min.css"/>
    <link rel="stylesheet" href="../css/bootstrap.css"/>
    <script type="text/javascript" src="../js/bootstrap3.0.3.min.js"></script>
    <link rel="stylesheet" type="text/css" href="../css/style.css">





</head>

<body class="bodycolor">

<nav class="navbar navbar-default navbar-fixed-top" style="clear: left;">
    <div class="container">
        <div class="navbar-right navfont" id="navbar-collapse">
            <p>华软网络技术系毕业管理系统</p>
        </div>
        <a href="a-cookie.php?cookie=out" id="out">退出</a>
    </div>

</nav>


<div class="nav topx navbackground-a" id="nav">
    <div>

        <div style="border-bottom:1px solid rgba(255,255,255,.1)"><img src="../images/mini.png"></div>
    </div>
    <ul>
        <?
        if($_SESSION["a-rank"]==0)
        {?>

            <li class="nav-item">
                <a href="a-index.php"><i class="my-icon nav-icon icon_2"></i><span>首页</span><i class="my-icon nav-more"></i></a>

            </li>
            <li class="nav-item">
                <a href="a-newsManage.php"><i class="my-icon nav-icon icon_5"></i><span>开放/新闻管理</span><i
                        class="my-icon nav-more"></i></a>
            </li>


            <li class="nav-item">
                <a href="a-all.php"><i class="my-icon nav-icon icon_6"></i><span>答辩汇总</span><i class="my-icon nav-more"></i></a>

            </li>
            <li class="nav-item">
                <a href="#"><i class="my-icon nav-icon icon_3"></i><span>答辩分组</span><i class="my-icon nav-more"></i></a>
                <ul>
                    <li>
                        <a href="a-denfenAsign.php"><span>小组分配</span></a>
                    </li>
                    <li>
                        <a href="a-denfenInterAsign.php"><span>组内分配</span></a>
                    </li>
                </ul>
            </li>
            <li class="nav-item">
                <a href="#"><i class="my-icon nav-icon icon_5"></i><span>资料管理</span><i class="my-icon nav-more"></i></a>
                <ul>
                    <li>
                        <a href="a-sInfromationmange.php"><span>学生资料管理</span></a>
                    </li>
                    <li>
                        <a href="a-tInfromationmange.php"><span>教师资料管理</span></a>
                    </li>
                </ul>
            </li>
        <?}else{
            ?>

            <li class="nav-item">
                <a href="a-index.php"><i class="my-icon nav-icon icon_2"></i><span>首页</span><i class="my-icon nav-more"></i></a>

            </li>
            <li class="nav-item">
                <a href="a-all.php"><i class="my-icon nav-icon icon_6"></i><span>答辩汇总</span><i class="my-icon nav-more"></i></a>

            </li>
            <li class="nav-item">
                <a href="#"><i class="my-icon nav-icon icon_3"></i><span>答辩分组</span><i class="my-icon nav-more"></i></a>
                <ul>
                    <li>
                        <a href="a-denfenInterAsign.php"><span>组内分配</span></a>
                    </li>
                </ul>
            </li>
        <? }
        ?>
    </ul>
</div>


<div class="indexborder">
    <center style="margin-left: 0px;">
        <div class="box-inline indexdiv1 panel panel-default auto" align="center">
            <div class="panel panel-primary panel-success">
                <div class="panel-heading" style="padding: 0px;color: black;font-style:initial;">
                    <h3 class="panel-title " style="background-color: #807345;padding: 15px;color: whitesmoke;">
                        答辩组内管理</h3>
                </div>

                <div class="panel-body">
                    <?php
                    include "../conn.php";
                    include "function.php";
                    if($_SESSION["a-rank"]==0){
                        $sql = "select groupId from defenseteam";
                    }else{
                        $id=$_SESSION["a-id"];
                        $sql="select groupId from defenseteam where groupadId=$id";

                    }
                    $result = mysqli_query($conn, $sql);
                    while ($Grow = $result->fetch_assoc()) {
                        ?>
                        <table class="table  table-hover  table-striped  table-condensed">
                            <caption align="top">组编号:<?= $Grow["groupId"] ?></caption>
                            <thead>
                            <tr class="thcolor-t">
                                <th>评分教师</th>
                                <th>学生</th>
                            </tr>
                            </thead>
                            <tbody class="thcolor-t">
                            <?php
                            getAsgin($Grow["groupId"], $conn);
                            ?>
                            </tbody>
                        </table>

                    <?php
                    }
                    ?>


                    <div class="panel-body">
                        <input type="button" value="自动分配任务" class="btn btn-primary btn-success"
                               style="background-color:#463c19;color:#ffffff " onclick="asign()">
                        <br><br><br><br><br><br><br><br>
                    </div>

                </div>


            </div>
        </div>
    </center>

</div>


<footer class="indexfooter container-fluid  bottom">
    <!--  <p class="footer-p" align="center">地址：广东省广州市从化区经济开发区高技术产业园广从南路548号 | 电话：020－87818918 邮编：510990 | 网站公安备案编号：4401840100050 粤ICP备：05085382号 站长统计</p>-->
</footer>


<script>
    window.jQuery || document.write('<script src="../js/jquery-1.11.0.min.js"><\/script>')
</script>
<script type="text/javascript" src="../js/nav.js"></script>
//弹窗实现js

<script>
    function asign() {

        $.ajax({
            type: "POST",
            url: "a-groupProcess.php",
            data: "actionType=autoAsign",
            success: function (msg) {

                window.location.href = '';
            }
        });
    }
</script>


</body>

</html>